package com.hyx.api.mapper;

import com.hyx.api.domain.OfferOrder;
import com.hyx.api.domain.bo.OfferOrderBo;
import com.hyx.api.domain.vo.InquiryOrderVo;
import com.hyx.api.domain.vo.OfferOrderVo;
import com.hyx.api.domain.vo.PcOfferPerVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 报价订单Mapper接口
 *
 * @author ruoyi
 * @date 2023-10-18
 */
public interface OfferOrderMapper extends BaseMapperPlus<OfferOrder, OfferOrderVo> {

    List<OfferOrderVo> queryOfferOrderVoList(@Param("bo") OfferOrderBo bo,
                                             @Param("offerOrderId") Long offerOrderId, @Param("userId") Long userId);

    /**
     * 回收商端
     * 如果登录用户为报价师则不传recycleBusId
     * 如果登录用户为回收商总账户，则不传userId
     *
     * @param queTime
     * @param userId
     * @param timeType     1：年月日  2：年月
     * @param recycleBusId
     * @param isSuccessful
     * @return
     */
    Long queryOfferCountByTimeUser(@Param("queTime") Date queTime,
                                   @Param("timeType") Integer timeType,
                                   @Param("userId") Long userId,
                                   @Param("recycleBusId") Long recycleBusId,
                                   @Param("isSuccessful") Boolean isSuccessful);

    /**
     * 获取未成交询价订单列表
     *
     * @param userId       报价师
     * @param recycleBusId 总账户
     * @return
     */
    List<InquiryOrderVo> queryNoSuccessInquiryListForRecycle(@Param("queTime") Date queTime,
                                                             @Param("userId") Long userId,
                                                             @Param("recycleBusId") Long recycleBusId);


    List<OfferOrderVo> queryPCOrderList(@Param("bo") OfferOrderBo bo);

    /**
     * 获取PC端统计-今日报价师业绩
     *
     * @return
     */
    List<PcOfferPerVo> queryPcOfferPerList();
}

